<txp:variable name="hasRelated" value='<txp:related_articles/>'/>

<txp:if_variable name="hasRelated" value="">
<txp:else />
<div class="related_posts"> 
<h4>Possibly Related Entries:</h4> 
<txp:related_articles limit="10" break="li" wraptag="ul" />
<br/> <!--cats-->
</div>
</txp:if_variable>